package com.example.mapper;

import com.example.model.Rule;
import com.example.model.VipRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RuleMapper {

    @Select("select * from vip_rules where vipLevl = #{level}")
    public VipRule selectVipRuleByLevel(@Param("level") String level);

    @Select("select * from rules where vipRuleId = #{vipRuleId}")
    public VipRule selectVipRuleByLevel(@Param("vipRuleId") Long vipRuleId);

    List<Rule> selectRulesByVipRuleId(Long vipRuleId);
}
